package insertpackage;

import java.sql.Connection;
import java.sql.PreparedStatement;
import java.sql.SQLException;

import javabean.Team;

public class Inserttea extends Insert{
	public void insertDB(Team team){
        Connection conn = null;
        PreparedStatement pstmt = null;
        
        try {
            conn = getConnection();
            
            pstmt = conn.prepareStatement("insert into TEAM values (?,?,?)");
            pstmt.setString(1, null);
            pstmt.setInt(2, team.getProNO());
            pstmt.setString(3, team.getEmpID());
            
            pstmt.executeUpdate();
        } catch(SQLException ex) {
        
        } finally {
            if (pstmt != null) try { pstmt.close(); } catch(SQLException ex) {}
            if (conn != null) try { conn.close(); } catch(SQLException ex) {}
        }
    }
}